package com.qf.service.impl;

import com.qf.entity.TUser;
import com.qf.service.ILoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @author LiuLiang
 * @Date 2020/3/12
 */
@Service
public class LoginServiceImpl implements ILoginService {

    @Autowired
    private RestTemplate restTemplate;

    @Override
    public TUser checkLogin(String username, String password) {
        return restTemplate.getForObject("http://liu-back-service-login/back/checkLogin?username="+username+"&password="+password,TUser.class);
    }
}
